#{extends 'head.html' /}
#{ set title:'蓝莲花 | 我的书房'/}


	<link rel="stylesheet" href="/public/stylesheets/alert.css" type="text/css" />
    <!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
	<script type="text/javascript" src="/public/javascripts/adu.alert.js"></script>
	#{set mb:service.MemberService.ckLogin(session) /}
	
<!-- content 开始-->
<div class="cont">
  <!-- 一 -->
  <div class="st_co1">
    <div class="cn_a_r1">
      <div class="cr1_n">
        <select>
          <option>书籍名字</option>
        </select>
      </div>
      <div class="cr1_x">
        <input type="text"/>
      </div>
      <div class="cr1_v"><a href="#"><img src="/public/indexFile/images/images_19.gif"/></a></div>
      <div class="cr1_m">
        <ul>
          <li class="mvn">热门搜索：</li>
          <li><a href="#">微微书香</a></li>
          <li><a href="#">微微书香</a></li>
          <li><a href="#">微微书香</a></li>
          <li><a href="#">微微书香</a></li>
        </ul>
      </div>
    </div>
  </div>
  <!-- 二 -->
  <div class="st_co2">
    <!-- 左 -->
    <div class="stc_l">
      <div class="stc_la">
        <div class="stc_la_1">
          <div class="sa_l"><a href="#"><img src="/public/indexFile/images/stu_5.gif"/></a></div>
          <div class="sa_r">
            <ul>
              <li>用户名：${meb?.memname}</li>
              <li>借阅卡号：${meb?.lecnum}</li>
              #{if mb.id != meb.id}
              			<li><a id = "addfriends" href="javascript:void(0)">${service.MemberService.ckfriends(mb.id,meb.id) == null ? "加为好友":""}</a></li>
              #{/if}
              #{else}
              	<li><a href="#">${service.MemberService.ckfriends(mb.id,meb.id)}</a></li>
              #{/else}
            </ul>
          </div>
        </div>
        <div class="stc_la_2">爱好：看书 下棋 游泳</div>
        <div class="stc_la_2">浏览权限：</div>
        <div class="stc_la_2">个人简介：我</div>
      </div>
      <div class="stc_lb">
        <div class="stcb_1">他的好友</div>
        <div class="stcb_2">
          <ul>
	            #{list items:flist,as:'fdlist'}
			            <li>
			              <div class="cb1"><a href="#"><img src="/public/indexFile/images/stu_5.gif"/></a></div>
			              <div class="cb2"><a href="#">撕碎的心</a></div>
			            </li>
	            #{/list}
          </ul>
        </div>
      </div>
      <div class="stc_lc">
        <div class="stcl_1">读书心情</div>
        <div class="stcl_2">
          <ul>
            <li class="tc"><a href="#">当你心情不好可以时试着...</a></li>
            <li><a href="#">当你心情不好可以时试着...</a></li>
            <li><a href="#">当你心情不好可以时试着...</a></li>
            <li><a href="#">当你心情不好可以时试着...</a></li>
            <li><a href="#">当你心情不好可以时试着...</a></li>
            <li><a href="#">当你心情不好可以时试着...</a></li>
            <li><a href="#">当你心情不好可以时试着...</a></li>
          </ul>
        </div>
      </div>
    </div>
    <!-- 右 -->
    <div class="stc_r">
      <div class="stcr_1">
        <div class="st_1a">我的日记</div>
        <div class="st_1b"><a href="/controllers/Members.forlog">发表日记</a></div>
      </div>
       
	      <div class="stcr_2">
	        <ul>
	         #{set i:1 /}
	         #{list items:spaceloglist,as:'loglist'}
		         
		          <li>
		          
		            	<div style="margin-top:20px;" class="sc_r2"><a href = "/controllers/Members.forallLog?logid=${loglist.id}" style="width:480px;display: block; float: left;overflow: hidden;">${i}<span>.&nbsp;&nbsp;&nbsp;&nbsp;</span>${loglist?.spatit}</a><span style="margin-left:10px;">${loglist?.spatime}</span><a style="margin-left:10px;" onclick="dellog(${loglist?.id});" href="javascript:void(0);">[删除]</a><a style="margin-left:10px;" href="#">[编辑]</a></div>
		           	
		            <!-- 回复第一层 开始 -->
		            <div style="display:none;" class="rey">
		              <ul>
		                <li>
		                  <div class="rey1"><a href="#"><img src="/public/indexFile/images/stu_5.gif"/></a></div>
		                  <div class="rey2">
		                    <div class="rey2_1"><a href="#">风叶</a>：怎么了？</div>
		                    <div class="rey2_2">2012-04-11 17：30<a href="javascript:void(0)" onclick="use(1)">回复</a></div>
		                  </div>
		                  <!-- 回复第二层 开始 -->
		                  <div class="rey3">
		                    <ul>
		                      <li>
		                        <div class="rey3_a"><a href="#"><img src="/public/indexFile/images/stu_5.gif"/></a></div>
		                        <div class="rey3_b">
		                          <div class="rey3_b1"><a href="#">风叶</a>：怎么了？</div>
		                          <div class="rey3_b2">2012-04-11 17：30</div>
		                        </div>
		                      </li>
		                      <li>
		                        <div class="rey3_a"><a href="#"><img src="/public/indexFile/images/stu_5.gif"/></a></div>
		                        <div class="rey3_b">
		                          <div class="rey3_b1"><a href="#">风叶</a>：怎么了？</div>
		                          <div class="rey3_b2">2012-04-11 17：30</div>
		                        </div>
		                      </li>
		                      <li>
		                        <div class="rey3_a"><a href="#"><img src="/public/indexFile/images/stu_5.gif"/></a></div>
		                        <div class="rey3_b">
		                          <div class="rey3_b1"><a href="#">风叶</a>：怎么了？</div>
		                          <div class="rey3_b2">2012-04-11 17：30</div>
		                        </div>
		                      </li>
		                      <li>
		                        <div class="repy" id="vn1" style="display:none;">
		                          <div class="repy1"><textarea id="en1" onblur="blure(1)" title=""></textarea></div>
		                          <div class="repy2" onmouseover="mous1(1)" onMouseOut="mous2(1)"onclick="mous3(1)">
		                            <div class="re_y1"><a href="javascript:void(0)">表情</a></div>
		                            <div class="re_y2"><a href="javascript:void(0)">发表</a></div>
		                          </div>
		                        </div>
		                      </li>
		                    </ul>
		                  </div>
		                </li>
		              </ul>
		            </div>
		            <!-- 回复第一层 结束 -->
		            <div style="display:none;" class="sc_r4" id="re1" onclick="hiddenvu(1)">我也说一句</div>
		            <div class="sc_r5" id="ve1">
		              <div class="sc_r5_1"><textarea id="ea1" onblur="licku(1)" title=""></textarea></div>
		              <div class="sc_r5_2" onmouseover="ckue1(1)" onMouseOut="ckue2(1)"onclick="ckue3(1)">
		                <div class="sc_r5_a" ><a href="javascript:void(0)">表情</a></div>
		                <div class="sc_r5_b"><a href="javascript:void(0)">发表</a></div>
		              </div>
		            </div>
		          
		          </li> 
		          #{set i:i+1 /}
	           #{/list}
	        </ul>
	      </div>
       
    </div>
  </div>
 <script>
 	var v = "vn";
	var e = "en";
	var g ;
 	var a = "re";
	var b = "ve";
	var c = "ea";
	var m;
	//一
	function use(s) {
		g = s;
		var a = document.getElementById(v + s).style.display;
		
		if (a == 'none') {
			document.getElementById(v + s).style.display = "block";
			document.getElementById(e + s).focus();
		} else {
			document.getElementById(v + s).style.display = "none";
		}
	}
	function blure(s) {
		var vl = document.getElementById(e + s).title;
		var v2 = document.getElementById(e + s).value;
		if(vl == '' && v2 == '') {
			setTimeout("euxm()",500);
		}
	}
	function euxm() {
		document.getElementById(v + g).style.display = "none";
	}
	function mous1(n) {
		var aa = document.getElementById(e + n).title = "表情";
		document.getElementById(v + n).style.display = "block";
	}
	function mous2(n) {
		document.getElementById(e + n).title = "";
	}
	function mous3(n) {
		document.getElementById(e + n).focus();
	}
	//二
	function hiddenvu(s) {//显示内容层
		m = s;
		document.getElementById(a + s).style.display = "none";
		document.getElementById(b + s).style.display = "block";
		document.getElementById(c + s).focus();
	}
	function licku(x) {
		var vl = document.getElementById(c + x).title;
		var v2 = document.getElementById(c + x).value;
		if(vl == '' && v2 == '') {
			setTimeout("ku()",500); 
		}
	}
	function ku() {
		document.getElementById(a + m).style.display = "block";
		document.getElementById(b + m).style.display = "none";
	}
	function ckue1(n) {
		var aa = document.getElementById(c + n).title = "表情";
		document.getElementById(a + n).style.display = "none";
		document.getElementById(b + n).style.display = "block";
	}
	function ckue2(n) {
		document.getElementById(c + n).title = "";
	}
	function ckue3(n) {
		document.getElementById(c + n).focus();
	}
	</script>
  <!-- 三 -->
  <div class="st_co3">
    <div class="st_co3_1">
    	<div class="st3_a">我的书架</div>
        <div class="st3_b">
        	<ul>
        	#{list items:carlist,as:'clist'}
            	<li>
                	<div class="st3_b1"><a href="#"><<${service.BookService.finBookType(clist.boo?.bookTypeIds)?.botName}>>${clist.boo?.booName}</a></div>
                    <div class="st3_b2">作者:<samp>${clist.boo?.auts}</samp></div>
                </li>
            #{/list}
            </ul>
        </div>
        <div class="st3_c">
        	<div class="st3_c1">编辑</div>
            <div class="st3_c2"><a href="#">上一页</a></div>
            <div class="st3_c3"><a href="#">下一页</a></div>
        </div>
    </div>
    <div class="st_co3_2">
    	<div class="stc3_a">最新留言</div>
        <div class="stc3_b">
        	<div class="stc3_b1">
            	<ul>
            		#{list items:mbMsglist, as:'mblist' }
                		<li><a href="#">${service.MemberService.finauser(mblist.tomemid)?.memnum}发表留言：</a>${mblist?.content}<span style="margin-left:20px;">${mblist?.msgtime}</span></li>
                	#{/list}
                </ul>
            </div>
            <div class="stc3_b2">
            	<div class="st_b2_1"><textarea id = "msgcontent" ></textarea></div>
                <div class="st_b2_2"><a id = "subm" href="#"><img src="/public/indexFile/images/stu_10.gif"/></a></div>
            </div>
        </div>
    </div>
  </div>
   <script type="text/javascript">
  		$("#subm").click(function(){
  			$.ajax({
  				type:'post',
  				url :'/controllers/Members.savemsg',
  				data:({"uid":${uid},"content":$("#msgcontent").val()}),
  				dataType:'html',
  				success:function(e){
  					if(e == "1"){
  						aduAlert("留言成功！","提示",function(){
  							window.location.href = "/controllers/Members.mybook?uid=${uid}";
  						});
  					}
  					if(e == "0"){
  						aduAlert("留言失败！","提示");
  					}
  				}
  			});
  		});
  		
  		function dellog(logid){
  			aduConfirmt("您确定要删除本篇日志？","提示",function(e){
	       							if(e == true ){
	       								$.ajax({
	       									type:'post',
	       									url :'/controllers/Members.dellog',
	       									data:({"logid":logid}),
	       									dataType:'html',
	       									success:function(et){
	       										if(et == "1"){
	       											aduAlert("删除成功！","提示",function(){
	       												window.location.href = "";
	       											});
	       										}
	       										if(et == "0"){
	       											aduAlert("删除失败！","提示");
	       										}
	       									}
	       								});
	       							}
	       							if(e == false){
	       							}
	       						});	
  		}
  		
  		$("#addfriends").click(function(){
  			$.ajax({
  				type:'post',
  				url :'/controllers/Members.addfd',
  				data:({"mid":${meb.id}}),
  				dataType:'html',
  				success:function(afd){
  					if(afd == "1"){
  						aduAlert("添加好友成功！","提示",function(){
  							window.location.href = "";
  						});
  					}
  					if(afd == "0"){
  						aduAlert("添加好友成功！","提示");
  					}
  				}
  			});
  		});
  </script>
</div>
<!-- content 结束-->